import request from "@/api/request";

export default {
    userList:(params,token) => {
        return request({
            url: "/user/userInfo/list",
            method: "post",
            data: params,
            headers: {'token': token},
        })
    },
    updateUserInfoOfRole:(params,token) => {
        return request({
            url: "/user/userInfo/updateUserInfoOfRole",
            method: "post",
            data: params,
            headers: {'token': token},
        })
    },
    modifyUserStatus:(params,token) => {
        return request({
            url: "/user/userInfo/modifyUserStatus",
            method: "post",
            data: params,
            headers: {'token': token},
        })
    },
    getUser:(params,token) => {
        return request({
            url: "/user/userInfo/list",
            method: "post",
            data: params,
            headers: {'token': token},
        })
    },
    getUser2:(params,token) => {
        return request({
            url: "/user/userInfo/listPage",
            method: "post",
            data: params,
            headers: {'token': token},
        })
    },
    getPublicKey:() => {
        return request({
            url: "/login/getPublicKey",
            method: "get",
        })
    },
    adminRegister:(param) => {
        return request({
            url: "/register/adminRegister",
            method: "post",
            data:param
        })
    },
    queryAuth:(param,token) => {
        return request({
            url: "/perssion/queryPerssion",
            method: "post",
            data:param,
            headers:{'token':token}
        })
    },
    queryRoleAuth:(param,token) => {
        return request({
            url: "/perssion/queryRolePermission",
            method: "post",
            data:param,
            headers:{'token':token}
        })
    },
    createRole:(param,token) => {
        return request({
            url: "/role/createUserRole",
            method: "post",
            data:param,
            headers:{'token':token}
        })
    },
    queryUserRole:(param,token) => {
        return request({
            url: "/role/queryeUserRole",
            method: "post",
            data:param,
            headers:{'token':token}
        })
    },
    updateUserRole:(param,token) => {
        return request({
            url: "/role/updateUserRole",
            method: "post",
            data:param,
            headers:{'token':token}
        })
    },
    queryNotice:(param,token) => {
        return request({
            url: "/notice/list",
            method: "post",
            data:param,
            headers:{'token':token}
        })
    },
    updateNotice:(param,token) => {
        return request({
            url: "/notice/update",
            method: "post",
            data:param,
            headers:{'token':token}
        })
    },
    getPublic: (token) => {
        return request({
            url: '/login/getPublicKey',
            method: 'get',
            headers: {'token': token}
        })
    },
    userLogin:(param,token)=>{
        return request({
            url:'/login/userLogin',
            method:'post',
            headers: {'token': token},
            data:param
        })
    },
    getPhoneCode:(param,token)=>{
        return request({
            url:'/login/getPhoneCode',
            method:'post',
            headers: {'token': token},
            data:param
        })
    },
    openSystem:(param,token)=>{
        return request({
            url:'/sys/switch/open',
            method:'post',
            headers: {'token': token},
            data:param
        })
    },
    closeSystem:(param,token)=>{
        return request({
            url:'/sys/switch/close',
            method:'post',
            headers: {'token': token},
            data:param
        })
    },
    querySystem:(param,token)=>{
        return request({
            url:'/sys/switch/query',
            method:'post',
            headers: {'token': token},
            data:param
        })
    },

    queryCompany:(param,token)=>{
        return request({
            url:'/exam/company/query',
            method:'post',
            headers: {'token': token},
            data:param
        })
    },
    createCompany:(param,token)=>{
        return request({
            url:'/exam/company/create',
            method:'post',
            headers: {'token': token},
            data:param
        })
    },
    updateCompany:(param,token)=>{
        return request({
            url:'/exam/company/update',
            method:'post',
            headers: {'token': token},
            data:param
        })
    },
    deleteCompany:(param,token)=>{
        return request({
            url:'/exam/company/delete',
            method:'post',
            headers: {'token': token},
            data:param
        })
    }

}